<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!-- 引用一个片段 -->
<div th:replace="~{fragments/header :: header}"></div>
<h2 th:text="${userModel.title}"></h2>
<div th:text="${userModel.user.id}"></div>
<div th:text="${userModel.user.name}"></div>
<div th:text="${userModel.user.email}"></div>
<!-- 引用一个片段 -->
<div th:replace="~{fragments/footer :: footer}"></div>
</body>
</html>